變數常數命名


Posted by mijouhsieh on 2023-04-14

若儲存的資料不會變更,宣告常數名稱 字首大寫---以表示此特性。

const Symbols = [
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17989/__.png', // 黑桃
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17992/heart.png', // 愛心
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17991/diamonds.png', // 方塊
  'https://assets-lighthouse.alphacamp.co/uploads/image/file/17988/__.png' // 梅花
]

#宣告變數 #變數常數命名







Related Posts

How to create a two dimensional array in JavaScript?

How to create a two dimensional array in JavaScript?

Express框架 架構

Express框架 架構

什麼是 Bootstrap ?

什麼是 Bootstrap ?


Comments